<?php
/**
 * Created by PhpStorm.
 * User: sosyuki
 * Date: 2018/9/20
 * Time: 16:56
 */

namespace Drupal\wx_mini_program;


class WxMiniProgramRetrieveController {

  function mini_info() {
    $share_img_uri = variable_get_value('wx_mini_program:mini:share_img');
    $share_img = FALSE;
    if (!empty($share_img_uri) && is_file($share_img_uri)) {
      $share_img = image_style_url('wx_mini_program_share_img', $share_img_uri);
    }
    return [
      'code' => 0,
      'msg' => 'ok',
      'name' => variable_get_value('wx_mini_program:mini:name'),
      'share_img' => $share_img,
    ];
  }

  function remind_update() {
    return [
      'code' => 0,
      'msg' => 'ok',
    ];
  }
}
